<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Dialog Framework <span class="subitem">Data</span>
    </ui:define>

    <ui:define name="description">
        Dialog Framework provides APIs to pass and retrieve data between the source page and the dialog.
    </ui:define>

    <ui:param name="documentationLink" value="/core/dialogframework"/>

    <ui:define name="implementation">
        <div class="card">
            <h:form>
                <p:growl id="growl" showDetail="true"/>

                <p:commandButton value="Select Product" icon="pi pi-home" action="#{dfView.chooseProduct}">
                    <p:ajax event="dialogReturn" listener="#{dfView.onProductChosen}" update="growl"/>
                </p:commandButton>
            </h:form>
        </div>
    </ui:define>

    <ui:define name="more-source-tabs">
        <p:tab title="/ui/df/selectProduct.xhtml">
            <f:attribute name="flatten" value="true"/>
        </p:tab>
    </ui:define>

</ui:composition>
